home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / bp70lib.zip / BIGARRAY.DOC next >
Text File  |  1993-04-15  |  1KB  |  45 lines

  1. unit bigarray;
  2.  
  3.  
  4.  
  5. interface
  6.  
  7.  
  8.  
  9.  
  10.  
  11. type atype=array[1..64000] of char;
  12.      aptr=^atype;
  13.      BAtype=array[1..10] of aptr;
  14.      { a bigarray is an array of 10 pointers. each pointer points to a
  15.        dynamically allocated array of 64000 bytes. the get and set routines
  16.        allow you to access the bigarray like a normal array. bigarray index
  17.        values are automatically translated into an array# and array index#.
  18.        NOTE: the size of a BAtype is limited only by installed RAM. This
  19.        implementation is hard coded to a max array size of 640000 bytes per
  20.        array. }
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. function BAsize(a:batype):longint;        { returns current size of array a }
  29. function BAget(a:batype; i:longint):char;           { returns value of a[i] }
  30. procedure BAset(var a:batype; i:longint; c:char);            { sets a[i]:=c }
  31. procedure BAinit(var a:batype; size:longint);
  32.              { allocates memory for array a. size is # of elements in array.
  33.                calulates # of atypes needed to hold the array and alloactes
  34.                that many atypes. sets the pointers in the batype to point
  35.                to the allocated memory. }
  36.  
  37. procedure BAdispose(var a:batype);
  38.                                            { deallocates memory for array a }
  39.  
  40.  
  41.  
  42. implementation
  43.  
  44.  
  45.